<?php
/**
 * Barcode接口
 */

namespace App\Http\Controllers\Api;

use App\Models\LogHelper;
use EasyWeChat\Core\Exception;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Http\Response;
use App\Services\IdEncryptService;
use CategoryRepository;
use TestingConfig;
use TestingDetailService;
use TestingDeveloperService;
use UserRecordService;
use TestingUserEnterpriseRelFacadeService;
use ResultTypeService;
use BarCodeService;
class BarCodeController extends Controller
{
    /**
     *  Barcode接口
     */

    public function auth($barCode)
    {


        try {
            $barCodeInfo = BarCodeService::getByBarCode($barCode);
            if(!$barCodeInfo){
                return barCodeFailed();
            }
            $barCodeInfo=$barCodeInfo['attributes'];
            unset($barCodeInfo['id']);
            return apiSuccess($barCodeInfo);
        } catch (Exception $e) {
                return barCodeFailed();
        }
    }


}
